-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor some tests to use ArrayValidationNode #186
Refactor some tests to use ArrayValidationNode #186
Conversation
@@ -120,8 +121,6 @@ TEST_CASE("AdvancedIndexingNode") { | |||
CHECK(B_ptr->size(state) == s_ptr->size(state)); | |||
|
|||
CHECK(std::ranges::equal(B_ptr->view(state), std::vector{4})); | |||
|
|||
verify_array_diff({}, {4}, B_ptr->diff(state)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to call propagate on the ArrayValidationNode
to ensure the diff is valid? Maybe we can switch a lot of these tests to using graph->propagate()
so we don't have to propagate all the nodes individually...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! Good catch. Will fix everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, should be fixed. Also made the tests a bit more future proof by just propagating/commiting/reverting all descendants.
13534ef
to
3b310b8
Compare
@@ -463,6 +450,8 @@ TEST_CASE("SetNode") { | |||
|
|||
auto ptr = graph.emplace_node<SetNode>(num_elements); | |||
|
|||
graph.emplace_node<ArrayValidationNode>(ptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're still missing propagate and revert for this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Ok, this time I think I got them all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, still an error. One sec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, fixed. This time for real.
521da7b
to
fa7bd8f
Compare
Replace uses of
verify_array_diff
withArrayValidationNode
.